package com.ibs.hadoop.spring.mybatis;

import java.util.List;

import org.junit.Test;

import com.ibs.hadoop.spring.TestParent;
import com.ibs.hadoop.spring.mybatis.dao.MyBatisQueryInf;

public class SpringMyBatisHiveContext extends TestParent {

    @Test
    public void runHiveQuery() {

        MyBatisQueryInf bean = (MyBatisQueryInf) this.getBean("myBatisQueryImpl");

        long startTime = System.currentTimeMillis();
        try {

            List<Object> list = bean.queryHiveToHbase();

            System.out.println(list);

            // System.out.println("开始打印短查询");
            // List<Object> list = bean.queryMsg();
            // list.forEach(s -> {
            // System.out.println(",值:" + s);
            // });

            // List<Map<String, Object>> list2 = bean.userTsQuery();
            // list2.forEach(s -> {
            // System.out.println(",值:" + s);
            // });

        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

        long endTime = System.currentTimeMillis();

        System.out.println("用时:" + (endTime - startTime) / 1000.f);

    }

}
